home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / MIDI.p < prev    next >
Encoding:
Text File  |  1997-08-12  |  20.1 KB  |  531 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        MIDI.p
  3.  
  4.      Contains:    MIDI Manager Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1988-1997 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT MIDI;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __MIDI__}
  28. {$SETC __MIDI__ := 1}
  29.  
  30. {$I+}
  31. {$SETC MIDIIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __ERRORS__}
  35. {$I Errors.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __TYPES__}
  38. {$I Types.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __MIXEDMODE__}
  41. {$I MixedMode.p}
  42. {$ENDC}
  43.  
  44.  
  45. {$PUSH}
  46. {$ALIGN MAC68K}
  47. {$LibExport+}
  48.  
  49. {
  50.                         * * *  N O T E  * * * 
  51.  
  52.     This file has been updated to include MIDI 2.0 interfaces.  
  53.     
  54.     The MIDI 2.0 interfaces were developed for the classic 68K runtime.
  55.     Since then, Apple has created the PowerPC and CFM 68K runtimes.
  56.     Currently, the extra functions in MIDI 2.0 are not in InterfaceLib
  57.     and thus not callable from PowerPC and CFM 68K runtimes (you'll
  58.     get a linker error).  
  59. }
  60.  
  61.  
  62. CONST
  63.     midiMaxNameLen                = 31;                            { maximum number of characters in port and client names }
  64.  
  65.                                                                 {  Time formats  }
  66.     midiFormatMSec                = 0;                            { milliseconds }
  67.     midiFormatBeats                = 1;                            { beats }
  68.     midiFormat24fpsBit            = 2;                            { 24 frames/sec. }
  69.     midiFormat25fpsBit            = 3;                            { 25 frames/sec. }
  70.     midiFormat30fpsDBit            = 4;                            { 30 frames/sec. drop-frame }
  71.     midiFormat30fpsBit            = 5;                            { 30 frames/sec. }
  72.     midiFormat24fpsQF            = 6;                            { 24 frames/sec. longInt format  }
  73.     midiFormat25fpsQF            = 7;                            { 25 frames/sec. longInt format  }
  74.     midiFormat30fpsDQF            = 8;                            { 30 frames/sec. drop-frame longInt format  }
  75.     midiFormat30fpsQF            = 9;                            { 30 frames/sec. longInt format  }
  76.  
  77.     midiInternalSync            = 0;                            { internal sync }
  78.     midiExternalSync            = 1;                            { external sync }
  79.  
  80.                                                                 {  Port types }
  81.     midiPortTypeTime            = 0;                            { time port }
  82.     midiPortTypeInput            = 1;                            { input port }
  83.     midiPortTypeOutput            = 2;                            { output port }
  84.     midiPortTypeTimeInv            = 3;                            { invisible time port }
  85.     midiPortInvisible            = $8000;                        { logical OR this to other types to make invisible ports }
  86.     midiPortTypeMask            = $0007;                        { logical AND with this to convert new port types to old, i.e. to strip the property bits }
  87.  
  88.                                                                 {  OffsetTimes   }
  89.     midiGetEverything            = $7FFFFFFF;                    { get all packets, regardless of time stamps }
  90.     midiGetNothing                = $80000000;                    { get no packets, regardless of time stamps }
  91.     midiGetCurrent                = $00000000;                    { get current packets only }
  92.  
  93. {    MIDI data and messages are passed in MIDIPacket records (see below).
  94.     The first byte of every MIDIPacket contains a set of flags
  95.  
  96.     bits 0-1    00 = new MIDIPacket, not continued
  97.                      01 = begining of continued MIDIPacket
  98.                      10 = end of continued MIDIPacket
  99.                      11 = continuation
  100.     bits 2-3     reserved
  101.  
  102.     bits 4-6      000 = packet contains MIDI data
  103.  
  104.                   001 = packet contains MIDI Manager message
  105.  
  106.     bit 7         0 = MIDIPacket has valid stamp
  107.                   1 = stamp with current clock
  108. }
  109.     midiContMask                = $03;
  110.     midiNoCont                    = $00;
  111.     midiStartCont                = $01;
  112.     midiMidCont                    = $03;
  113.     midiEndCont                    = $02;
  114.     midiTypeMask                = $70;
  115.     midiMsgType                    = $00;
  116.     midiMgrType                    = $10;
  117.     midiTimeStampMask            = $80;
  118.     midiTimeStampCurrent        = $80;
  119.     midiTimeStampValid            = $00;
  120.  
  121.                                                                 {  MIDIPacket command words (the first word in the data field for midiMgrType messages)  }
  122.     midiOverflowErr                = $0001;
  123.     midiSCCErr                    = $0002;
  124.     midiPacketErr                = $0003;                        { all command words less than this value are error indicators }
  125.     midiMaxErr                    = $00FF;
  126.  
  127.                                                                 {  Valid results to be returned by readHooks  }
  128.     midiKeepPacket                = 0;
  129.     midiMorePacket                = 1;
  130.     midiNoMorePacket            = 2;
  131.     midiHoldPacket                = 3;
  132.  
  133.                                                                 {  Driver calls  }
  134.     midiOpenDriver                = 1;
  135.     midiCloseDriver                = 2;
  136.  
  137.     mdvrAbortNotesOff            = 0;                            { abort previous mdvrNotesOff request }
  138.     mdvrChanNotesOff            = 1;                            { generate channel note off messages }
  139.     mdvrAllNotesOff                = 2;                            { generate all note off messages }
  140.     mdvrStopOut                    = 0;                            { stop calling MDVROut temporarily }
  141.     mdvrStartOut                = 1;                            { resume calling MDVROut }
  142.  
  143.  
  144. TYPE
  145.     MIDIPacketPtr = ^MIDIPacket;
  146.     MIDIPacket = PACKED RECORD
  147.         flags:                    UInt8;
  148.         len:                    UInt8;
  149.         tStamp:                    LONGINT;
  150.         data:                    PACKED ARRAY [0..248] OF UInt8;
  151.     END;
  152.  
  153.     MIDIReadHookProcPtr = ProcPtr;  { FUNCTION MIDIReadHook(myPacket: MIDIPacketPtr; myRefCon: LONGINT): INTEGER; }
  154.  
  155.     MIDITimeProcPtr = ProcPtr;  { PROCEDURE MIDITime(curTime: LONGINT; myRefCon: LONGINT); }
  156.  
  157.     MIDIConnectionProcPtr = ProcPtr;  { PROCEDURE MIDIConnection(refnum: INTEGER; refcon: LONGINT; portType: INTEGER; clientID: OSType; portID: OSType; connect: BOOLEAN; direction: INTEGER); }
  158.  
  159.     MDVRCommProcPtr = ProcPtr;  { FUNCTION MDVRComm(refnum: INTEGER; request: INTEGER; refCon: LONGINT): LONGINT; }
  160.  
  161.     MDVRTimeCodeProcPtr = ProcPtr;  { PROCEDURE MDVRTimeCode(refnum: INTEGER; newFormat: INTEGER; refCon: LONGINT); }
  162.  
  163.     MDVRReadProcPtr = ProcPtr;  { PROCEDURE MDVRRead(midiChars: CStringPtr; length: INTEGER; refCon: LONGINT); }
  164.  
  165.     MIDIReadHookUPP = UniversalProcPtr;
  166.     MIDITimeUPP = UniversalProcPtr;
  167.     MIDIConnectionUPP = UniversalProcPtr;
  168.     MDVRCommUPP = UniversalProcPtr;
  169.     MDVRTimeCodeUPP = UniversalProcPtr;
  170.     MDVRReadUPP = UniversalProcPtr;
  171.     MIDIClkInfoPtr = ^MIDIClkInfo;
  172.     MIDIClkInfo = RECORD
  173.         syncType:                INTEGER;                                { synchronization external/internal }
  174.         curTime:                LONGINT;                                { current value of port's clock }
  175.         format:                    INTEGER;                                { time code format }
  176.     END;
  177.  
  178.     MIDIIDRecPtr = ^MIDIIDRec;
  179.     MIDIIDRec = RECORD
  180.         clientID:                OSType;
  181.         portID:                    OSType;
  182.     END;
  183.  
  184.     MIDIPortInfoPtr = ^MIDIPortInfo;
  185.     MIDIPortInfo = RECORD
  186.         portType:                INTEGER;                                { type of port }
  187.         timeBase:                MIDIIDRec;                                { MIDIIDRec for time base }
  188.         numConnects:            INTEGER;                                { number of connections }
  189.         cList:                    ARRAY [0..0] OF MIDIIDRec;                { ARRAY [1..numConnects] of MIDIIDRec }
  190.     END;
  191.  
  192.     MIDIPortInfoHdl                        = ^MIDIPortInfoPtr;
  193.     MIDIPortInfoHandle                    = ^MIDIPortInfoPtr;
  194.     MIDIPortParamsPtr = ^MIDIPortParams;
  195.     MIDIPortParams = RECORD
  196.         portID:                    OSType;                                    { ID of port, unique within client }
  197.         portType:                INTEGER;                                { Type of port - input, output, time, etc. }
  198.         timeBase:                INTEGER;                                { refnum of time base, 0 if none }
  199.         offsetTime:                LONGINT;                                { offset for current time stamps }
  200.         readHook:                MIDIReadHookProcPtr;                    { routine to call when input data is valid }
  201.         refCon:                    LONGINT;                                { refcon for port (for client use) }
  202.         initClock:                MIDIClkInfo;                            { initial settings for a time base }
  203.         name:                    Str255;                                    { name of the port, This is a real live string, not a ptr. }
  204.     END;
  205.  
  206.     MIDIIDListPtr = ^MIDIIDList;
  207.     MIDIIDList = RECORD
  208.         numIDs:                    INTEGER;
  209.         list:                    ARRAY [0..0] OF OSType;
  210.     END;
  211.  
  212.     MIDIIDListHdl                        = ^MIDIIDListPtr;
  213.     MIDIIDListHandle                    = ^MIDIIDListPtr;
  214. {  MDVR Control structs }
  215.     MDVRInCtlRecPtr = ^MDVRInCtlRec;
  216.     MDVRInCtlRec = RECORD
  217.         timeCodeClock:            INTEGER;                                { refnum of time base for time code }
  218.         timeCodeFormat:            INTEGER;                                { format of time code output }
  219.         readProc:                MDVRReadProcPtr;                        { proc to call with intput characters }
  220.         commProc:                MDVRCommProcPtr;                        { proc to call for handshaking }
  221.         refCon:                    LONGINT;                                { refCon passed to readProc, commProc }
  222.     END;
  223.  
  224.     MDVRInCtlPtr                        = ^MDVRInCtlRec;
  225.     MDVROutCtlRecPtr = ^MDVROutCtlRec;
  226.     MDVROutCtlRec = RECORD
  227.         timeCodeClock:            INTEGER;                                { time base driven by time code }
  228.         timeCodeFormat:            INTEGER;                                { format of time code to listen to }
  229.         timeCodeProc:            MDVRTimeCodeProcPtr;                    { proc called on time code fmt change }
  230.         commProc:                MDVRCommProcPtr;                        { proc called for handshaking }
  231.         refCon:                    LONGINT;                                { refCon passed to timeCodeProc }
  232.         timeCodeFilter:            BOOLEAN;                                { filter time code if true }
  233.         padding:                SInt8;                                    { unused pad byte }
  234.         midiMsgTicks:            LONGINT;                                { value of Ticks when MIDI msg rcvd }
  235.         timeCodeTicks:            LONGINT;                                { value of Ticks when time code rcvd }
  236.     END;
  237.  
  238.     MDVROutCtlPtr                        = ^MDVROutCtlRec;
  239.     MDVRPtr                                = Ptr;
  240. FUNCTION MIDIVersion: NumVersion;
  241.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  242.     INLINE $203C, $0000, $0004, $A800;
  243.     {$ENDC}
  244. FUNCTION MIDISignIn(clientID: OSType; refCon: LONGINT; icon: Handle; name: ConstStr255Param): OSErr;
  245.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  246.     INLINE $203C, $0004, $0004, $A800;
  247.     {$ENDC}
  248. PROCEDURE MIDISignOut(clientID: OSType);
  249.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  250.     INLINE $203C, $0008, $0004, $A800;
  251.     {$ENDC}
  252. FUNCTION MIDIGetClients: MIDIIDListHandle;
  253.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  254.     INLINE $203C, $000C, $0004, $A800;
  255.     {$ENDC}
  256. PROCEDURE MIDIGetClientName(clientID: OSType; VAR name: Str255);
  257.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  258.     INLINE $203C, $0010, $0004, $A800;
  259.     {$ENDC}
  260. PROCEDURE MIDISetClientName(clientID: OSType; name: ConstStr255Param);
  261.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  262.     INLINE $203C, $0014, $0004, $A800;
  263.     {$ENDC}
  264. FUNCTION MIDIGetPorts(clientID: OSType): MIDIIDListHandle;
  265.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  266.     INLINE $203C, $0018, $0004, $A800;
  267.     {$ENDC}
  268. FUNCTION MIDIAddPort(clientID: OSType; BufSize: INTEGER; VAR refnum: INTEGER; init: MIDIPortParamsPtr): OSErr;
  269.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  270.     INLINE $203C, $001C, $0004, $A800;
  271.     {$ENDC}
  272. FUNCTION MIDIGetPortInfo(clientID: OSType; portID: OSType): MIDIPortInfoHandle;
  273.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  274.     INLINE $203C, $0020, $0004, $A800;
  275.     {$ENDC}
  276. FUNCTION MIDIConnectData(srcClID: OSType; srcPortID: OSType; dstClID: OSType; dstPortID: OSType): OSErr;
  277.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  278.     INLINE $203C, $0024, $0004, $A800;
  279.     {$ENDC}
  280. FUNCTION MIDIUnConnectData(srcClID: OSType; srcPortID: OSType; dstClID: OSType; dstPortID: OSType): OSErr;
  281.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  282.     INLINE $203C, $0028, $0004, $A800;
  283.     {$ENDC}
  284. FUNCTION MIDIConnectTime(srcClID: OSType; srcPortID: OSType; dstClID: OSType; dstPortID: OSType): OSErr;
  285.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  286.     INLINE $203C, $002C, $0004, $A800;
  287.     {$ENDC}
  288. FUNCTION MIDIUnConnectTime(srcClID: OSType; srcPortID: OSType; dstClID: OSType; dstPortID: OSType): OSErr;
  289.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  290.     INLINE $203C, $0030, $0004, $A800;
  291.     {$ENDC}
  292. PROCEDURE MIDIFlush(refnum: INTEGER);
  293.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  294.     INLINE $203C, $0034, $0004, $A800;
  295.     {$ENDC}
  296. FUNCTION MIDIGetReadHook(refnum: INTEGER): ProcPtr;
  297.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  298.     INLINE $203C, $0038, $0004, $A800;
  299.     {$ENDC}
  300. PROCEDURE MIDISetReadHook(refnum: INTEGER; hook: ProcPtr);
  301.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  302.     INLINE $203C, $003C, $0004, $A800;
  303.     {$ENDC}
  304. PROCEDURE MIDIGetPortName(clientID: OSType; portID: OSType; VAR name: Str255);
  305.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  306.     INLINE $203C, $0040, $0004, $A800;
  307.     {$ENDC}
  308. PROCEDURE MIDISetPortName(clientID: OSType; portID: OSType; name: ConstStr255Param);
  309.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  310.     INLINE $203C, $0044, $0004, $A800;
  311.     {$ENDC}
  312. PROCEDURE MIDIWakeUp(refnum: INTEGER; time: LONGINT; period: LONGINT; timeProc: MIDITimeProcPtr);
  313.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  314.     INLINE $203C, $0048, $0004, $A800;
  315.     {$ENDC}
  316. PROCEDURE MIDIRemovePort(refnum: INTEGER);
  317.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  318.     INLINE $203C, $004C, $0004, $A800;
  319.     {$ENDC}
  320. FUNCTION MIDIGetSync(refnum: INTEGER): INTEGER;
  321.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  322.     INLINE $203C, $0050, $0004, $A800;
  323.     {$ENDC}
  324. PROCEDURE MIDISetSync(refnum: INTEGER; sync: INTEGER);
  325.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  326.     INLINE $203C, $0054, $0004, $A800;
  327.     {$ENDC}
  328. FUNCTION MIDIGetCurTime(refnum: INTEGER): LONGINT;
  329.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  330.     INLINE $203C, $0058, $0004, $A800;
  331.     {$ENDC}
  332. PROCEDURE MIDISetCurTime(refnum: INTEGER; time: LONGINT);
  333.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  334.     INLINE $203C, $005C, $0004, $A800;
  335.     {$ENDC}
  336. PROCEDURE MIDIStartTime(refnum: INTEGER);
  337.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  338.     INLINE $203C, $0060, $0004, $A800;
  339.     {$ENDC}
  340. PROCEDURE MIDIStopTime(refnum: INTEGER);
  341.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  342.     INLINE $203C, $0064, $0004, $A800;
  343.     {$ENDC}
  344. PROCEDURE MIDIPoll(refnum: INTEGER; offsetTime: LONGINT);
  345.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  346.     INLINE $203C, $0068, $0004, $A800;
  347.     {$ENDC}
  348. FUNCTION MIDIWritePacket(refnum: INTEGER; packet: MIDIPacketPtr): OSErr;
  349.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  350.     INLINE $203C, $006C, $0004, $A800;
  351.     {$ENDC}
  352. FUNCTION MIDIWorldChanged(clientID: OSType): BOOLEAN;
  353.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  354.     INLINE $203C, $0070, $0004, $A800;
  355.     {$ENDC}
  356. FUNCTION MIDIGetOffsetTime(refnum: INTEGER): LONGINT;
  357.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  358.     INLINE $203C, $0074, $0004, $A800;
  359.     {$ENDC}
  360. PROCEDURE MIDISetOffsetTime(refnum: INTEGER; offsetTime: LONGINT);
  361.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  362.     INLINE $203C, $0078, $0004, $A800;
  363.     {$ENDC}
  364. FUNCTION MIDIConvertTime(srcFormat: INTEGER; dstFormat: INTEGER; time: LONGINT): LONGINT;
  365.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  366.     INLINE $203C, $007C, $0004, $A800;
  367.     {$ENDC}
  368. FUNCTION MIDIGetRefCon(refnum: INTEGER): LONGINT;
  369.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  370.     INLINE $203C, $0080, $0004, $A800;
  371.     {$ENDC}
  372. PROCEDURE MIDISetRefCon(refnum: INTEGER; refCon: LONGINT);
  373.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  374.     INLINE $203C, $0084, $0004, $A800;
  375.     {$ENDC}
  376. FUNCTION MIDIGetClRefCon(clientID: OSType): LONGINT;
  377.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  378.     INLINE $203C, $0088, $0004, $A800;
  379.     {$ENDC}
  380. PROCEDURE MIDISetClRefCon(clientID: OSType; refCon: LONGINT);
  381.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  382.     INLINE $203C, $008C, $0004, $A800;
  383.     {$ENDC}
  384. FUNCTION MIDIGetTCFormat(refnum: INTEGER): INTEGER;
  385.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  386.     INLINE $203C, $0090, $0004, $A800;
  387.     {$ENDC}
  388. PROCEDURE MIDISetTCFormat(refnum: INTEGER; format: INTEGER);
  389.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  390.     INLINE $203C, $0094, $0004, $A800;
  391.     {$ENDC}
  392. PROCEDURE MIDISetRunRate(refnum: INTEGER; rate: INTEGER; time: LONGINT);
  393.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  394.     INLINE $203C, $0098, $0004, $A800;
  395.     {$ENDC}
  396. FUNCTION MIDIGetClientIcon(clientID: OSType): Handle;
  397.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  398.     INLINE $203C, $009C, $0004, $A800;
  399.     {$ENDC}
  400. FUNCTION MIDICallAddress(callNum: INTEGER): ProcPtr;
  401.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  402.     INLINE $203C, $00A4, $0004, $A800;
  403.     {$ENDC}
  404. PROCEDURE MIDISetConnectionProc(refNum: INTEGER; connectionProc: ProcPtr; refCon: LONGINT);
  405.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  406.     INLINE $203C, $00A8, $0004, $A800;
  407.     {$ENDC}
  408. PROCEDURE MIDIGetConnectionProc(refnum: INTEGER; VAR connectionProc: ProcPtr; VAR refCon: LONGINT);
  409.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  410.     INLINE $203C, $00AC, $0004, $A800;
  411.     {$ENDC}
  412. PROCEDURE MIDIDiscardPacket(refnum: INTEGER; packet: MIDIPacketPtr);
  413.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  414.     INLINE $203C, $00B0, $0004, $A800;
  415.     {$ENDC}
  416. FUNCTION MDVRSignIn(clientID: OSType; refCon: LONGINT; icon: Handle; VAR name: Str255): OSErr;
  417.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  418.     INLINE $203C, $00B4, $0004, $A800;
  419.     {$ENDC}
  420. PROCEDURE MDVRSignOut(clientID: OSType);
  421.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  422.     INLINE $203C, $00B8, $0004, $A800;
  423.     {$ENDC}
  424. FUNCTION MDVROpen(portType: INTEGER; refnum: INTEGER): MDVRPtr;
  425.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  426.     INLINE $203C, $00BC, $0004, $A800;
  427.     {$ENDC}
  428. PROCEDURE MDVRClose(driverPtr: MDVRPtr);
  429.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  430.     INLINE $203C, $00C0, $0004, $A800;
  431.     {$ENDC}
  432. PROCEDURE MDVRControlIn(portPtr: MDVRPtr; inputCtl: MDVRInCtlPtr);
  433.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  434.     INLINE $203C, $00C4, $0004, $A800;
  435.     {$ENDC}
  436. PROCEDURE MDVRControlOut(portPtr: MDVRPtr; outputCtl: MDVROutCtlPtr);
  437.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  438.     INLINE $203C, $00C8, $0004, $A800;
  439.     {$ENDC}
  440. PROCEDURE MDVRIn(portPtr: MDVRPtr);
  441.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  442.     INLINE $203C, $00CC, $0004, $A800;
  443.     {$ENDC}
  444. PROCEDURE MDVROut(portPtr: MDVRPtr; dataPtr: CStringPtr; length: INTEGER);
  445.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  446.     INLINE $203C, $00D0, $0004, $A800;
  447.     {$ENDC}
  448. PROCEDURE MDVRNotesOff(portPtr: MDVRPtr; mode: INTEGER);
  449.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  450.     INLINE $203C, $00D4, $0004, $A800;
  451.     {$ENDC}
  452.  
  453. CONST
  454.     uppMIDIReadHookProcInfo = $000003E0;
  455.     uppMIDITimeProcInfo = $000003C0;
  456.     uppMIDIConnectionProcInfo = $0009FB80;
  457.     uppMDVRCommProcInfo = $00000EB0;
  458.     uppMDVRTimeCodeProcInfo = $00000E80;
  459.     uppMDVRReadProcInfo = $00000EC0;
  460.  
  461. FUNCTION NewMIDIReadHookProc(userRoutine: MIDIReadHookProcPtr): MIDIReadHookUPP;
  462.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  463.     INLINE $2E9F;
  464.     {$ENDC}
  465.  
  466. FUNCTION NewMIDITimeProc(userRoutine: MIDITimeProcPtr): MIDITimeUPP;
  467.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  468.     INLINE $2E9F;
  469.     {$ENDC}
  470.  
  471. FUNCTION NewMIDIConnectionProc(userRoutine: MIDIConnectionProcPtr): MIDIConnectionUPP;
  472.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  473.     INLINE $2E9F;
  474.     {$ENDC}
  475.  
  476. FUNCTION NewMDVRCommProc(userRoutine: MDVRCommProcPtr): MDVRCommUPP;
  477.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  478.     INLINE $2E9F;
  479.     {$ENDC}
  480.  
  481. FUNCTION NewMDVRTimeCodeProc(userRoutine: MDVRTimeCodeProcPtr): MDVRTimeCodeUPP;
  482.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  483.     INLINE $2E9F;
  484.     {$ENDC}
  485.  
  486. FUNCTION NewMDVRReadProc(userRoutine: MDVRReadProcPtr): MDVRReadUPP;
  487.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  488.     INLINE $2E9F;
  489.     {$ENDC}
  490.  
  491. FUNCTION CallMIDIReadHookProc(myPacket: MIDIPacketPtr; myRefCon: LONGINT; userRoutine: MIDIReadHookUPP): INTEGER;
  492.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  493.     INLINE $205F, $4E90;
  494.     {$ENDC}
  495.  
  496. PROCEDURE CallMIDITimeProc(curTime: LONGINT; myRefCon: LONGINT; userRoutine: MIDITimeUPP);
  497.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  498.     INLINE $205F, $4E90;
  499.     {$ENDC}
  500.  
  501. PROCEDURE CallMIDIConnectionProc(refnum: INTEGER; refcon: LONGINT; portType: INTEGER; clientID: OSType; portID: OSType; connect: BOOLEAN; direction: INTEGER; userRoutine: MIDIConnectionUPP);
  502.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  503.     INLINE $205F, $4E90;
  504.     {$ENDC}
  505.  
  506. FUNCTION CallMDVRCommProc(refnum: INTEGER; request: INTEGER; refCon: LONGINT; userRoutine: MDVRCommUPP): LONGINT;
  507.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  508.     INLINE $205F, $4E90;
  509.     {$ENDC}
  510.  
  511. PROCEDURE CallMDVRTimeCodeProc(refnum: INTEGER; newFormat: INTEGER; refCon: LONGINT; userRoutine: MDVRTimeCodeUPP);
  512.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  513.     INLINE $205F, $4E90;
  514.     {$ENDC}
  515.  
  516. PROCEDURE CallMDVRReadProc(midiChars: CStringPtr; length: INTEGER; refCon: LONGINT; userRoutine: MDVRReadUPP);
  517.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  518.     INLINE $205F, $4E90;
  519.     {$ENDC}
  520.  
  521. {$ALIGN RESET}
  522. {$POP}
  523.  
  524. {$SETC UsingIncludes := MIDIIncludes}
  525.  
  526. {$ENDC} {__MIDI__}
  527.  
  528. {$IFC NOT UsingIncludes}
  529.  END.
  530. {$ENDC}
  531.